﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    public string dbName = "";

    protected void Page_Load(object sender, EventArgs e)
    {
        dbName = Request.QueryString["dbname"];
        bindData();

    }

    private void bindData()
    {

        iData.mysqlDataAcess worker = new iData.mysqlDataAcess();
        string sql = @"select TABLE_COMMENT as tbltitle,TABLE_NAME as tblname from information_schema.TABLES
where table_schema='chromosome_db'";
        if (dbName != "")
        {
            sql = sql.Replace("chromosome_db", dbName);
        }
        else
        {
            sql = sql.Replace("chromosome_db", worker.dbSetting.database);

        }
        var dset = worker.Execute(sql);

        rptTblList.DataSource = dset;
        rptTblList.DataBind();

    }

}